package com.neusoft.controller;

import com.neusoft.entity.SystemMenu;
import com.neusoft.service.SystemMenuComsumerService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author whongf
 * @create 2020-06-08-20:14
 */
@RestController
@RequestMapping("systemmenu/feign")
public class SystemMenuComsumerController {
    @Autowired
    private SystemMenuComsumerService systemMenuComsumerService;

    @PostMapping("queryAll")
    public Map<String, Object> queryAll(){
        return systemMenuComsumerService.queryAll();
    }

    @PostMapping("queryAllIn")
    public Object queryAllIn(@RequestParam("page") Integer page, @RequestParam("limit") Integer limit, @RequestBody SystemMenu systemMenu){
        return systemMenuComsumerService.queryAllIn(page,limit,systemMenu);
    }

    @PostMapping("save")
    public Object save(@RequestBody SystemMenu systemMenu){
        return systemMenuComsumerService.save(systemMenu);
    }
    @PostMapping("delete")
    public Object delete(@RequestBody Integer[] ids){
        return systemMenuComsumerService.delete(ids);
    }
}
